package com.example.one.service;

import com.example.one.pojo.Product;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: trtan
 * @date: 2021-06-13 07:37
 **/
@Service
public class ProductService {
    /**
     * 查询所有产品信息
     * @param
     * @return java.util.List<com.example.one.pojo.Product>
     * @author trtan
     * @date 2021/6/13 7:39
     */
    public List<Product> getAllProducts() {
        List<Product> products = new ArrayList<>();
        products.add(new Product(1, "苹果", 3.5));
        products.add(new Product(2, "香蕉", 4));
        products.add(new Product(3, "荔枝", 12));
        return products;
    }
}
